package office.dao.hr;

import platform.common.dao.impl.BaseDomainProviderImpl;

public class ExamineSetingDP extends BaseDomainProviderImpl {
	
	public String getExamineSetingListByFromUserId(){
		String hql = "from ExamineSeting where fromUserId =:fromUserId";
		return hql;
	}
	
	public String getExamineSetingListByToUserId(){
		String hql = "select " +
				"  new office.bo.hr.impl.ExamineSeting(es.id,es.toUserId,es.fromUserId,es.type,user.cname,fp.cname)" +
				"  from ExamineSeting es,User user,FormulaProject fp " +
				"  where es.fromUserId = user.id and fp.name = es.type and toUserId =:toUserId";
		return hql;
	}
	
	public String getDeleteExamineSetingByFormUserId(){
		String hql = "delete from ExamineSeting where fromUserId =:fromUserId";
		return hql;
	}
	
	public String getDeleteExamineSetingByToUserId(){
		String hql = "delete from ExamineSeting where toUserId =:toUserId";
		return hql;
	}
	 
}
